import {createApp} from 'vue';
import App from './App.vue';
import router from './router';
import {setupStore} from '@/store';
import * as directive from "@/directive"; // 自定义指令
import i18n from '@/lang/index';
import './permission';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';

import 'virtual:svg-icons-register';


import 'uno.css';
import '@/styles/index.scss';


const app = createApp(App);

// 全局挂载 pinia
setupStore(app);

// 自定义指令
Object.keys(directive).forEach(key => {
  app.directive(key, directive[key]);
});

app.use(ElementPlus);
app.use(router);
app.use(i18n);
app.mount('#app');
